<!doctype html>
<html class="no-js">
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>到货产品信息</title>

  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit">

  <!-- No Baidu Siteapp-->
  <meta http-equiv="Cache-Control" content="no-siteapp"/>

  <link rel="icon" type="image/png" href="assets/i/favicon.png">

  <!-- Add to homescreen for Chrome on Android -->
  <meta name="mobile-web-app-capable" content="yes">
  <link rel="icon" sizes="192x192" href="assets/i/app-icon72x72@2x.png">

  <!-- Add to homescreen for Safari on iOS -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
  <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">

  <!-- Tile icon for Win8 (144x144 + tile color) -->
  <meta name="msapplication-TileImage" content="assets/i/app-icon72x72@2x.png">
  <meta name="msapplication-TileColor" content="#0e90d2">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  
  

  <link rel="stylesheet" href="assets/css/amazeui.min.css">
  <link rel="stylesheet" href="assets/css/document.css">
  
     <script src="assets/js/jquery.min.js"></script>
<script src="assets/js/amazeui.js"></script>
<script src="assets/js/memu.js"></script>
<script src="assets/js/PublicFunction.js"></script>	
 <script src="assets/js/baiduTemplate.js"></script> 

  <style type="text/css">

	

  </style>
</head>
<body>



<div id="parent" >
<div data-am-sticky id="header">
	<header data-am-widget="header" class="am-header am-header-default">
		<div class="am-header-left am-header-nav">
			<a  href="javascript:backA()" class="">
				
				<i class="am-header-icon am-icon-chevron-left"></i>
			</a>
		</div>
		<h1 class="am-header-title" style="font-size:14px;">
			到货产品详情
		</h1>
		<div class="am-header-right am-header-nav">
			<a href="javascript:menu()" class="">
				<i class="am-header-icon am-icon-list-ul"></i>
			</a>
			
		</div>	
	<!-- 遮罩-->
	<div class="am-modal am-modal-no-btn" tabindex="-1" id="memu-modal">
  
	</div>
	</header>
</div>

	
		<div class="am-slider  am-slider-b1" id = "am-slider-b1" data-am-flexslider>
			<ul class="am-slides" id = "ProductImg">
			<!-- 	<li>
					<img id ="ProductImg1" src="http://s.amazeui.org/media/i/demos/bing-1.jpg">
				</li> --> 
			<!-- 	<li>
					<img  id ="ProductImg2" src="http://s.amazeui.org/media/i/demos/bing-2.jpg">
				</li>
				<li>
					<img id ="ProductImg3" src="http://s.amazeui.org/media/i/demos/bing-3.jpg">
				</li> -->
				
			</ul>
		</div>
	<div style="width: 100%;" id="div_info">
	<script type="text/javascript" id= "info">
		<div  id="img_title">		
			<h2><%=list.name%></h2>
		</div>
		
		<div  id="img_content">		
			<div id="money"><h3>$<%=list.Price%></h3></div>
			
			<div  id="information" >
				
						<ul>
							<li style="	width:15%;">
								<img src="assets/img/20150720142534.png" width="25px" height="25px">
							</li>
							<li style="	width:24%;"><%=list.username%></li>
							<li style="	width:30%;">库存：<%=list.Stock%></li>
							<li style="	width:30%;">品规：<%=list.specifications%><li>
						<ul>
					
				
			</div>
			<div class="am-scrollable-horizontal">
				<table class="am-table am-table-striped "   style="border-bottom: 0px;">
					
					<tr ><td style="border-bottom: 0px;" ><h3 style="text-align:left;">产品描述:</h3><%=list.description%></td></tr>
				</table>
			</div>
		</div>

	</div>
	
</br></br>
	<div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default "id="">
  <ul class="am-navbar-nav am-cf am-avg-sm-4" style="width:100%; padding:0 0; ">
    <li style="background-color:#f90461;">
      <a href="javascript:gotoUserInfo('<%=t_username%>')" >
        
        <span class="am-navbar-label">查看进口商信息</span>
      </a>
    </li>
    <li style="background-color:#00abf0;">
      <a href="javascript:gotoMyProduct('<%=t_username%>');" >
     
        <span class="am-navbar-label">查看所有产品</span>
      </a>
    </li>
    
    <li style="background-color:#f90461;">
    <a href="javascript:addmywarehouse('<%=list.id%>');" >
   
      <span class="am-navbar-label">添加我的产品库</span>
    </a>
  </li>
   
  </ul>
</div>

</script>
</div>


<script type="text/javascript">

function init(w,h) {
	//生成menu
	generateMenu();
	
	//根据ID 获取产品
	var c_username =  getLoginUserName();
	var t_username = getThisActivityParamate("username");

	var sjson =  DucumentFunction.getProductbyId();
	
	 if(sjson!=null&&sjson.length>0){
		 var json = strToJson(sjson);
		 var serverpath= Public_method.getServerPath()+"upload/";
		 var data={
				server:serverpath,
					list:json,
					username:c_username,
					t_username:t_username
				} 
			var bat=baidu.template;
			var title_img_html=bat('info',data);
			//渲染
			 document.getElementById('div_info').innerHTML=title_img_html;   
			 $("#ProductImg").html("");
			 
				var ProductImg1 = json.ProductImg1;
				var li ="";
				if(ProductImg1!=null){
					 li = li + "<li><img src=\""+serverpath+json.ProductImg1+"\"></li>";
				}
				var ProductImg2 = json.ProductImg2;
				if(ProductImg2!=null){
					 li = li + "<li><img src=\""+serverpath+json.ProductImg2+"\"></li>";
				}
				
				var ProductImg3 = json.ProductImg3;
				if(ProductImg3!=null){
					 li = li + "<li><img src=\""+serverpath+json.ProductImg3+"\"></li>";
				}
				
				$("#ProductImg").html(li); 
			
				
				$('.am-slider').flexslider();
		
		
	 }

	
}

function redact(id){

	Public_method.gotoRedact(id);
	
}


function gotoUserInfo(username){
	Public_method.gotoUserInfo(username);
}


//跳转供应商的产品库
 function gotoMyProduct(username){
	 
	 Public_method.gotoMyProduct(username);
 }

//添加我的产品库
 function addmywarehouse(id){
	 DucumentFunction.addmywarehouse(id);
	  
 }
</script>

</body>
</html>
